]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Flip the popup menu triangle for RTL
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 19 Aug 2013 14:02:22 +0000 (10:02 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 19 Aug 2013 14:04:03 +0000 (10:04 -0400)
Triangles should be flipped in RTL. This is the easiest way to do it that
doesn't rely on modifying the rotating logic, though it is a bit hacky since
the ClutterActor "scale-x" property technically considers the lower bound
to be 0. It works, though.

js/ui/popupMenu.js

index 524aab56b2742271a555498bc189125edc40bd61..dd5b028039aa4d6c3616f562d66726881bcdefc5 100644 (file)
@@ -958,6 +958,9 @@ const PopupSubMenuMenuItem = new Lang.Class({
         this._triangleBin = new St.Widget({ y_expand: true,
                                             y_align: Clutter.ActorAlign.CENTER });
         this._triangleBin.add_child(this._triangle);
+        if (this._triangleBin.get_text_direction() == Clutter.TextDirection.RTL)
+            this._triangleBin.set_scale(-1.0, 1.0);
+
         this.actor.add_child(this._triangleBin);
 
         this.menu = new PopupSubMenu(this.actor, this._triangle);